/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.dynamicrecord.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jeeplus.modules.member.entity.Member;
import javax.validation.constraints.NotNull;

import com.jeeplus.core.persistence.DataEntity;
import com.jeeplus.common.utils.excel.annotation.ExcelField;
import com.jeeplus.modules.sessions.entity.Sessions;

import java.util.Date;

/**
 * 活跃收益记录Entity
 * @author freedom
 * @version 2020-08-24
 */
public class DynamicRecord extends DataEntity<DynamicRecord> {
	
	private static final long serialVersionUID = 1L;
	private Member member;		// 用户名
	private Member frommem;		// 收益来源
	private Double money;		// 动态收益
	private String name;		// 收益名称

	private Date exportTime;

	//前端幸运星返利明细用   分区实体
	private Sessions sessions;
	
	public DynamicRecord() {
		super();
	}

	public DynamicRecord(String id){
		super(id);
	}

	@ExcelField(title="用户名", fieldType=Member.class, value="member.loginName", align=2, sort=1)
	public Member getMember() {
		return member;
	}

	public void setMember(Member member) {
		this.member = member;
	}
	
	@ExcelField(title="收益来源", fieldType=Member.class, value="frommem.loginName", align=2, sort=2)
	public Member getFrommem() {
		return frommem;
	}

	public void setFrommem(Member frommem) {
		this.frommem = frommem;
	}
	
	@NotNull(message="动态不能为空")
	@ExcelField(title="动态收益", align=2, sort=3)
	public Double getMoney() {
		return money;
	}

	public void setMoney(Double money) {
		this.money = money;
	}
	
	@ExcelField(title="收益名称", align=2, sort=4)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="时间", align=2, sort=5)
	public Date getExportTime() {
		return exportTime;
	}

	public void setExportTime(Date exportTime) {
		this.exportTime = exportTime;
	}

	public Sessions getSessions() {
		return sessions;
	}

	public void setSessions(Sessions sessions) {
		this.sessions = sessions;
	}
}